﻿using NUnit.Framework;
using System.Collections.Generic;
using OpenSda.Agilcont.Common.Data.Contracts;
using OpenSda.Agilcont.Common.Data.Entities;
using System;
using System.Linq;

namespace OpenSda.Agilcont.Common.Data.NhContexts.NuTest
{
    //angel hinojosa
    [TestFixture]
    public class DataAccessAgenciaConfigDataTest : AbstractBaseDataTests
    {
        private IDataAccessAgenciaConfigData target;
        private IModuleAccessData moduleAccessData;

        // These properties will be injected based on type
        public IDataAccessAgenciaConfigData DataAccessAgenciaConfigData { set { target = value; } }
        public IModuleAccessData ModuleAccessData { set { moduleAccessData = value; } }

        [Test()]
        public void GetAllQueryableTest()
        {
            IList<DataAccessAgenciaConfig> dataAccessAgenciaConfigs = target.GetAllQueryable().Where(daac => daac.Role == "aa").ToList();
            Assert.IsTrue(dataAccessAgenciaConfigs.Count > 0);
        }



        //private IDataAccessAgenciaConfigData dataAccessAgenciaConfigData;
        ////private IOrderDao orderDao;


        //// These properties will be injected based on type
        //public IDataAccessAgenciaConfigData DataAccessAgenciaConfigData
        //{
        //    set { dataAccessAgenciaConfigData = value; }
        //}


        //[Test]
        //public void DataAccessAgenciaConfigDaListAllTests()
        //{
        //    var c = dataAccessAgenciaConfigData.GetAll();

        //    Assert.IsNotNull(c);
        //}

        //[Test]
        //public void DataAccessAgenciaConfigDaoSeclectTests()
        //{
        //    DataAccessAgenciaConfig c = dataAccessAgenciaConfigData.Select(new Guid("AS5"));
        //    Assert.IsNotNull(c);
        //}


        //[Test]
        //public void DataAccessAgenciaConfigDeleteTests()
        //{
        //    DataAccessAgenciaConfig c = dataAccessAgenciaConfigData.Select(new Guid("AS5"));
        //    dataAccessAgenciaConfigData.Delete(c);
        //}

        //[Test]
        //public void DataAccessAgenciaConfigDaoTests()
        //{
        //    DataAccessAgenciaConfig c = new DataAccessAgenciaConfig();

        //    c.Role= "UPeU-5";
        //    //c.AgenciaRef=?;
        //    //c.ModuleAccessRef=?;
        //    dataAccessAgenciaConfigData.Save(c);



        //}

    }
}